package global

import (
	"dfx_cmdb/cmdb-agent/config"

	"github.com/google/nftables"
	"github.com/robfig/cron/v3"
)

type SvcConfig struct {
	Config    *config.Config
	Cron      *cron.Cron
	Nft       *nftables.Conn
	CronJobId cron.EntryID
}

func NewSvc() *SvcConfig {
	cronInstance := cron.New()
	cronInstance.Start() // 在这里启动一次
	return &SvcConfig{
		Cron:      cronInstance,
		Nft:       &nftables.Conn{},
		CronJobId: 0,
	}
}

var Svc *SvcConfig

const (
	AGENT_BLACKLIST = "agent_blacklist"
)

var AppStatus = make(map[string]bool)
